/** @namespace app.model.DetailAnchorData */
module.exports = app => {
  const {DATE, STRING, DECIMAL, INTEGER, DATEONLY} = app.Sequelize;

  const DetailAnchorData = app.model.define('detail_anchor_data', {
    danmu: {type: INTEGER.UNSIGNED, defaultValue: 0},//弹幕数量
    danmu1: {type: INTEGER.UNSIGNED, defaultValue: 0},//发弹幕的人次
    gift: {type: INTEGER.UNSIGNED, defaultValue: 0},//送礼物的人次
    gift1: {type: DECIMAL(10, 1).UNSIGNED, defaultValue: 0},//礼物收入
    fans: {type: INTEGER.UNSIGNED, defaultValue: 0},//粉丝量
    watch: {type: INTEGER.UNSIGNED, defaultValue: 0},//观看量
    time: {type: INTEGER.UNSIGNED, defaultValue: 0},//直播时长
    created_at: {type: DATEONLY, unique: 'anchor_date'},
    anchor_id: {type: INTEGER, unique: 'anchor_date'},
  }, {updatedAt: false});

  return DetailAnchorData;
};